<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/PtrVector.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">PtrVector.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_ptr_vector_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef HELIB_PTRVECTOR_H</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define HELIB_PTRVECTOR_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;stdexcept&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;climits&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &lt;NTL/vector.h&gt;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="assertions_8h.html">helib/assertions.h</a>&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="api_attributes_8h.html">helib/apiAttributes.h</a>&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector.html">   31</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector</a></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;{</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector.html#abc089c886cc629d470c5773eae531b81">   33</a></span>&#160;  <span class="keyword">virtual</span> T* <a class="code" href="structhelib_1_1_ptr_vector.html#abc089c886cc629d470c5773eae531b81">operator[]</a>(<span class="keywordtype">long</span>) <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="comment">// NOTE: the PtrVector is const, but the pointer T* is not</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">   35</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector.html#a6a5775f538d76c96e6bc5067044d8f77">   37</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structhelib_1_1_ptr_vector.html#a6a5775f538d76c96e6bc5067044d8f77">resize</a>(<span class="keywordtype">long</span> newSize, <a class="code" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector</a>* another = <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  {</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>() != newSize)</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;      <span class="keywordflow">throw</span> <a class="code" href="classhelib_1_1_logic_error.html">LogicError</a>(<span class="stringliteral">&quot;Cannot resize a generic PtrVector&quot;</span>);</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  }</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector.html#ab731703604d61537a72ab8f2ca9c2735">   42</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="structhelib_1_1_ptr_vector.html#ab731703604d61537a72ab8f2ca9c2735">~PtrVector</a>() {}</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector.html#afdc2a14a65d1d9e38cc95721ed245fd9">   44</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="structhelib_1_1_ptr_vector.html#afdc2a14a65d1d9e38cc95721ed245fd9">isSet</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordflow">if</span> (i &lt; 0 || i &gt;= <a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>())</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;      <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordflow">return</span> ((*<span class="keyword">this</span>)[i] != <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  }</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <span class="comment">// How many non-null entries there are (beginning at startFrom)</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector.html#a5da2b16e1e2cd897c06440c99e01550b">   52</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector.html#a5da2b16e1e2cd897c06440c99e01550b">numNonNull</a>(<span class="keywordtype">long</span> first = 0, <span class="keywordtype">long</span> last = LONG_MAX)<span class="keyword"> const</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">if</span> (first &lt; 0)</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;      first = 0;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordflow">if</span> (last &gt; <a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>())</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;      last = <a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>();</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">long</span> count = 0;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">long</span> i = first; i &lt; last; i++)</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;      <span class="keywordflow">if</span> ((*<span class="keyword">this</span>)[i] != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        count++;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordflow">return</span> count;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  }</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <span class="comment">// Return a pointer to some non-Null T, if it can find one.</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <span class="comment">// This is convenient since T may not have an empty constructor</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector.html#a3bf579aa08ab3625ba489571fe0148b8">   67</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> T* <a class="code" href="structhelib_1_1_ptr_vector.html#a3bf579aa08ab3625ba489571fe0148b8">ptr2nonNull</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">long</span> i = 0; i &lt; <a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>(); i++) {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;      T* pt = (*this)[i];</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;      <span class="keywordflow">if</span> (pt != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordflow">return</span> pt;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  }</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;};</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment">// This header provides five implementations of these interfaces, but</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="comment">// users can define their own as needed. The ones defined here are:</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">// struct PtrVector_VecT;    // constructed as PtrVector_VecT(NTL::Vec&lt;T&gt;)</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment">// struct PtrVector_VecPt;   // constructed as PtrVector_VecPt(NTL::Vec&lt;T*&gt;)</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment">// struct PtrVector_vectorT; // constructed as PtrVector_vectorT(std::vector&lt;T&gt;)</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment">// struct PtrVector_vectorPt;// constructed PtrVector_vectorPt(std::vector&lt;T*&gt;)</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment">// struct PtrVector_slice;// A slice, PtrVector_slice(PtrVector, start, length)</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="namespacehelib.html#a368a1406fcc81e32dce3caebda60477b">   89</a></span>&#160;<span class="keywordtype">long</span> <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(<span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; v)</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;{</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="keywordflow">return</span> v.<a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>();</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;}</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="namespacehelib.html#a030064c52dceba94106ffbd8afb564ef">   94</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">setLengthZero</a>(<a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; v)</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;{</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  v.<a class="code" href="structhelib_1_1_ptr_vector.html#a6a5775f538d76c96e6bc5067044d8f77">resize</a>(0);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;}</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">resize</a>(PtrVector&lt;T&gt;&amp; v, <span class="keywordtype">long</span> newSize, <span class="keyword">const</span> T&amp; val);</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="comment">// implementation of resize function below</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="namespacehelib.html#a6a1574e2c95b30b1eb204d669f029368">  102</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">resize</a>(<a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; v, <span class="keywordtype">long</span> newSize, <span class="keyword">const</span> T* val)</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;{</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  resize&lt;T&gt;(v, newSize, *val);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;}</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="comment">// Templates for element-wise vector-copy</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">// Generic version for std::vector, NTL::Vec</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> V1, <span class="keyword">typename</span> V2&gt;</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="namespacehelib.html#a03ca08051d06a786cf812e238a0cad15">  111</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a03ca08051d06a786cf812e238a0cad15">vecCopy</a>(V1&amp; v1, <span class="keyword">const</span> V2&amp; v2, <span class="keywordtype">long</span> sizeLimit = 0)</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;{</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <span class="keywordtype">int</span> n = <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(v2);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="keywordflow">if</span> (sizeLimit &gt; 0 &amp;&amp; sizeLimit &lt; n)</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    n = sizeLimit;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  <span class="keywordflow">if</span> (n == 0)</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <a class="code" href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">setLengthZero</a>(v1);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <a class="code" href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">resize</a>(v1, n, v2[0]);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n; i++)</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;      v1[i] = v2[i];</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  }</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;}</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="comment">// Specializations for PtrVector</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> V, <span class="keyword">typename</span> T&gt; <span class="comment">// V is either Vec&lt;T&gt; or vector&lt;T&gt;</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="namespacehelib.html#aa4d8218e2c0fee25ebec6d40d2a6036d">  127</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a03ca08051d06a786cf812e238a0cad15">vecCopy</a>(V&amp; v1, <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; v2, <span class="keywordtype">long</span> sizeLimit = 0)</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;{</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <span class="keywordtype">int</span> n = <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(v2);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <span class="keywordflow">if</span> (sizeLimit &gt; 0 &amp;&amp; sizeLimit &lt; n)</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    n = sizeLimit;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  <span class="keywordflow">if</span> (n == 0)</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <a class="code" href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">setLengthZero</a>(v1);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <a class="code" href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">resize</a>(v1, n, *(v2[0]));</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n; i++)</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;      v1[i] = *(v2[i]);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;}</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> V, <span class="keyword">typename</span> T&gt; <span class="comment">// V is either Vec&lt;T&gt; or vector&lt;T&gt;</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="namespacehelib.html#a7dd2ecf9ca1ddd7c2e7372fb8999030d">  141</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a03ca08051d06a786cf812e238a0cad15">vecCopy</a>(<a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; v1, <span class="keyword">const</span> V&amp; v2, <span class="keywordtype">long</span> sizeLimit = 0)</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;{</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  <span class="keywordtype">int</span> n = <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(v2);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <span class="keywordflow">if</span> (sizeLimit &gt; 0 &amp;&amp; sizeLimit &lt; n)</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    n = sizeLimit;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;  <span class="keywordflow">if</span> (n == 0)</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <a class="code" href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">setLengthZero</a>(v1);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <a class="code" href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">resize</a>(v1, n, v2[0]);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n; i++)</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;      *(v1[i]) = v2[i];</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  }</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;}</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="comment">// V is either Vec&lt;T&gt; or vector&lt;T&gt;</span></div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="namespacehelib.html#a2b1de5f6a3cb9f9da27cd496659cc899">  155</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a03ca08051d06a786cf812e238a0cad15">vecCopy</a>(<a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; v2, <span class="keywordtype">long</span> sizeLimit = 0)</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;{</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <span class="keywordtype">int</span> n = <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(v2);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  <span class="keywordflow">if</span> (sizeLimit &gt; 0 &amp;&amp; sizeLimit &lt; n)</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    n = sizeLimit;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  <span class="keywordflow">if</span> (n == 0)</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <a class="code" href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">setLengthZero</a>(v1);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <a class="code" href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">resize</a>(v1, n, *(v2[0]));</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n; i++)</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;      *(v1[i]) = *(v2[i]);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;  }</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;}</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="comment">/*******************************************************************/</span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="comment">/* Implementation details: applications should not care about them */</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="comment">/*******************************************************************/</span></div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_pt.html">  175</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html">PtrVector_VecPt</a> : <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector</a>&lt;T&gt;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;{</div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_pt.html#a13beff6b37d2d307e5a1c26abb76d04f">  177</a></span>&#160;  NTL::Vec&lt;T*&gt;&amp; <a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html#a13beff6b37d2d307e5a1c26abb76d04f">v</a>;</div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_pt.html#a7915ecea39b38f475704f02b78e09053">  178</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html#a7915ecea39b38f475704f02b78e09053">PtrVector_VecPt</a>(NTL::Vec&lt;T*&gt;&amp; _v) : <a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html#a13beff6b37d2d307e5a1c26abb76d04f">v</a>(_v) {}</div>
<div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_pt.html#a82fdd9778f18cf7b87b12ea60dbf565b">  179</a></span>&#160;  T* <a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html#a82fdd9778f18cf7b87b12ea60dbf565b">operator[]</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html#a13beff6b37d2d307e5a1c26abb76d04f">v</a>[i]; }</div>
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_pt.html#a086388e84b3dbc5db2ae7bb22948071e">  180</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html#a086388e84b3dbc5db2ae7bb22948071e">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html#a13beff6b37d2d307e5a1c26abb76d04f">v</a>.length(); }</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_pt.html#a96a6d280cd775de74ab9b91a9e35d09c">  182</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html#a96a6d280cd775de74ab9b91a9e35d09c">resize</a>(<span class="keywordtype">long</span> newSize,</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;              <a class="code" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>* another = <span class="keyword">nullptr</span>)<span class="keyword"> override</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    <a class="code" href="structhelib_1_1_ptr_vector___vec_pt.html#a13beff6b37d2d307e5a1c26abb76d04f">v</a>.SetLength(newSize, <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;  }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;};</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_pt.html">  191</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html">PtrVector_vectorPt</a> : <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector</a>&lt;T&gt;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;{</div>
<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_pt.html#a77990795ae1bcc2caf5747d3add8e6bb">  193</a></span>&#160;  std::vector&lt;T*&gt;&amp; <a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html#a77990795ae1bcc2caf5747d3add8e6bb">v</a>;</div>
<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_pt.html#a54662bb2902c8e8110e51a4ac9eb6f2b">  194</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html#a54662bb2902c8e8110e51a4ac9eb6f2b">PtrVector_vectorPt</a>(std::vector&lt;T*&gt;&amp; _v) : <a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html#a77990795ae1bcc2caf5747d3add8e6bb">v</a>(_v) {}</div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_pt.html#a0dec1c13c3e3baeb4f23931bfbfc28e4">  195</a></span>&#160;  T* <a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html#a0dec1c13c3e3baeb4f23931bfbfc28e4">operator[]</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html#a77990795ae1bcc2caf5747d3add8e6bb">v</a>[i]; }</div>
<div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_pt.html#af74fbb7079d79823dad48dab1c6872b2">  196</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html#af74fbb7079d79823dad48dab1c6872b2">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> long(<a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html#a77990795ae1bcc2caf5747d3add8e6bb">v</a>.size()); }</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_pt.html#ad1c539d9e2913a94f9f981810558c6c0">  198</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html#ad1c539d9e2913a94f9f981810558c6c0">resize</a>(<span class="keywordtype">long</span> newSize,</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;              <a class="code" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>* another = <span class="keyword">nullptr</span>)<span class="keyword"> override</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <a class="code" href="structhelib_1_1_ptr_vector__vector_pt.html#a77990795ae1bcc2caf5747d3add8e6bb">v</a>.resize(newSize, <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  }</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;};</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160; </div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_t.html">  207</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_vector___vec_t.html">PtrVector_VecT</a> : <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector</a>&lt;T&gt;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;{</div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">  209</a></span>&#160;  NTL::Vec&lt;T&gt;&amp; <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>;</div>
<div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_t.html#a1f8af4723666bb8463f9dc85b00b0eb2">  210</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#a1f8af4723666bb8463f9dc85b00b0eb2">PtrVector_VecT</a>(NTL::Vec&lt;T&gt;&amp; _v) : <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>(_v) {}</div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_t.html#a3b565f0bbcb3681e6cdfc1c4eca25cbe">  211</a></span>&#160;  T* <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#a3b565f0bbcb3681e6cdfc1c4eca25cbe">operator[]</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> &amp;(<a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>[i]); }</div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_t.html#ad86a4d41f0525743ffca562e78d13564">  212</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ad86a4d41f0525743ffca562e78d13564">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>.length(); }</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160; </div>
<div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_t.html#a7ff9c92c58394a1aa942823fef8073b2">  214</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#a7ff9c92c58394a1aa942823fef8073b2">resize</a>(<span class="keywordtype">long</span> newSize, <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>* another)<span class="keyword"> override</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordflow">if</span> (newSize == 0)</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;      <a class="code" href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">setLengthZero</a>(<a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;      <span class="comment">// Try to find a non-null pointer to T that you can give to resize</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;      <span class="keywordflow">if</span> (another == <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;        another = <span class="keyword">this</span>;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;      <span class="keyword">const</span> T* pt = another-&gt;<a class="code" href="structhelib_1_1_ptr_vector.html#a3bf579aa08ab3625ba489571fe0148b8">ptr2nonNull</a>();</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;      <a class="code" href="namespacehelib.html#aa7b1da8169ee8b9a0ab221e4c67961c5">assertNotNull</a>(pt, <span class="stringliteral">&quot;another-&gt;ptr2nonNull() returned a null ptr&quot;</span>);</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;      <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>.SetLength(newSize, *pt); <span class="comment">// Do the actual resize</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    }</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  }</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_t.html#a730d286bbba068be3c36ab69489a5d37">  228</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#a730d286bbba068be3c36ab69489a5d37">numNonNull</a>(<span class="keywordtype">long</span> first = 0, <span class="keywordtype">long</span> last = LONG_MAX)<span class="keyword"> const override</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    <span class="keywordflow">if</span> (first &lt; 0)</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;      first = 0;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordflow">if</span> (last &gt; <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>.length())</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;      last = <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>.length();</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="keywordflow">return</span> last - first;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;  }</div>
<div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___vec_t.html#a5bcfb83b4337e0e31367a1cae725affa">  236</a></span>&#160;  <span class="keyword">const</span> T* <a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#a5bcfb83b4337e0e31367a1cae725affa">ptr2nonNull</a>()<span class="keyword"> const override</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    <span class="keywordflow">return</span> ((<a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>.length() &gt; 0) ? &amp;(<a class="code" href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">v</a>[0]) : <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;  }</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;};</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160; </div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_t.html">  244</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_vector__vector_t.html">PtrVector_vectorT</a> : <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector</a>&lt;T&gt;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;{</div>
<div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">  246</a></span>&#160;  std::vector&lt;T&gt;&amp; <a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">v</a>;</div>
<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_t.html#a31444837cd854f5243c231da910849b5">  247</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a31444837cd854f5243c231da910849b5">PtrVector_vectorT</a>(std::vector&lt;T&gt;&amp; _v) : <a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">v</a>(_v) {}</div>
<div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_t.html#a77ddb054d9d3b96fd3975c4316f58794">  248</a></span>&#160;  T* <a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a77ddb054d9d3b96fd3975c4316f58794">operator[]</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> &amp;(<a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">v</a>[i]); }</div>
<div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_t.html#a39098ecd0d18e94eb5b0e03c32177834">  249</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a39098ecd0d18e94eb5b0e03c32177834">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> long(<a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">v</a>.size()); }</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160; </div>
<div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_t.html#a593724493c64d574c3f7fa6a1ee97a12">  251</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a593724493c64d574c3f7fa6a1ee97a12">resize</a>(<span class="keywordtype">long</span> newSize, <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>* another)<span class="keyword"> override</span></div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    <span class="keywordflow">if</span> (newSize == 0)</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;      <a class="code" href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">setLengthZero</a>(<a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">v</a>);</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;      <span class="comment">// Try to find a non-null pointer to T that you can give to resize</span></div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;      <span class="keywordflow">if</span> (another == <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        another = <span class="keyword">this</span>;</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;      <span class="keyword">const</span> T* pt = another-&gt;<a class="code" href="structhelib_1_1_ptr_vector.html#a3bf579aa08ab3625ba489571fe0148b8">ptr2nonNull</a>();</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;      <a class="code" href="namespacehelib.html#aa7b1da8169ee8b9a0ab221e4c67961c5">assertNotNull</a>(pt, <span class="stringliteral">&quot;another-&gt;ptr2nonNull() returned a null ptr&quot;</span>);</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;      <a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">v</a>.resize(newSize, *pt); <span class="comment">// do the actual resize</span></div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    }</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;  }</div>
<div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__vector_t.html#a46f021a0d256cb5e221763a21831a3db">  264</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a46f021a0d256cb5e221763a21831a3db">numNonNull</a>(<span class="keywordtype">long</span> first = 0, <span class="keywordtype">long</span> last = LONG_MAX)<span class="keyword"> const override</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    <span class="keywordflow">if</span> (first &lt; 0)</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;      first = 0;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    <span class="keywordflow">if</span> (last &gt; <span class="keywordtype">long</span>(<a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">v</a>.size()))</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;      last = long(<a class="code" href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">v</a>.size());</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    <span class="keywordflow">return</span> last - first;</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;  }</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;};</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160; </div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__slice.html">  276</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_vector__slice.html">PtrVector_slice</a> : <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector</a>&lt;T&gt;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;{</div>
<div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">  278</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">orig</a>;</div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__slice.html#a49c021e144758caeec99eb69d24badfb">  279</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a>, <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a49c021e144758caeec99eb69d24badfb">sz</a>;</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  <span class="comment">// Special case for a slice of a slice</span></div>
<div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__slice.html#a6f625d020b8d5af7991c91068838ae67">  281</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a6f625d020b8d5af7991c91068838ae67">PtrVector_slice</a>(<span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector__slice.html">PtrVector_slice&lt;T&gt;</a>&amp; slice, <span class="keywordtype">long</span> from, <span class="keywordtype">long</span> _sz = -1) :</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;      <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">orig</a>(slice.<a class="code" href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">orig</a>)</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  {</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="keywordflow">if</span> (from &lt; 0)</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;      from = 0;</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <span class="keywordflow">if</span> (_sz == 0 || from &gt;= slice.<a class="code" href="structhelib_1_1_ptr_vector__slice.html#a9e13512a1a7039cbd3fdc910331c6f62">size</a>()) { <span class="comment">// empty slice</span></div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;      <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a> = slice.<a class="code" href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">orig</a>.size();</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;      <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a49c021e144758caeec99eb69d24badfb">sz</a> = 0;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    }</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="comment">// If we got here then 0 &lt;= from &lt; slice.size()</span></div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a> = slice.<a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a> + from;</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160; </div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    <span class="keywordflow">if</span> (_sz &lt; 0 || from + _sz &gt; slice.<a class="code" href="structhelib_1_1_ptr_vector__slice.html#a9e13512a1a7039cbd3fdc910331c6f62">size</a>()) <span class="comment">// slice goes to end of slice</span></div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;      _sz = slice.<a class="code" href="structhelib_1_1_ptr_vector__slice.html#a9e13512a1a7039cbd3fdc910331c6f62">size</a>() - from;</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a49c021e144758caeec99eb69d24badfb">sz</a> = _sz;</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;  }</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;  <span class="comment">// The general case: slice of a PtrVector</span></div>
<div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__slice.html#af631ab07ef484ac2e555a6406d8d2d16">  299</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector__slice.html#af631ab07ef484ac2e555a6406d8d2d16">PtrVector_slice</a>(<span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; _orig, <span class="keywordtype">long</span> from, <span class="keywordtype">long</span> _sz = -1) :</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;      <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">orig</a>(_orig), <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a>(from), <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a49c021e144758caeec99eb69d24badfb">sz</a>(_sz)</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;  {</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a> &lt; 0)</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;      <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a> = 0;</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a> &gt; _orig.<a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>())</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;      <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a> = _orig.<a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>();</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;    <span class="keywordflow">if</span> (sz &lt; 0 || sz &gt; _orig.<a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>() - <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a>)</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;      <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a49c021e144758caeec99eb69d24badfb">sz</a> = _orig.<a class="code" href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">size</a>() - <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a>;</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;  }</div>
<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__slice.html#a6e32e8c177881cca566e9a5a08a7b918">  309</a></span>&#160;  T* <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a6e32e8c177881cca566e9a5a08a7b918">operator[]</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">orig</a>[i + <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a>]; }</div>
<div class="line"><a name="l00310"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__slice.html#a9e13512a1a7039cbd3fdc910331c6f62">  310</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a9e13512a1a7039cbd3fdc910331c6f62">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a49c021e144758caeec99eb69d24badfb">sz</a>; }</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160; </div>
<div class="line"><a name="l00312"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__slice.html#a8c453d6aa154e480686dfc82b80c0fe4">  312</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a8c453d6aa154e480686dfc82b80c0fe4">numNonNull</a>(<span class="keywordtype">long</span> first = 0, <span class="keywordtype">long</span> last = LONG_MAX)<span class="keyword"> const override</span></div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">orig</a>.numNonNull(<a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a> + first, <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">start</a> + std::min(<a class="code" href="structhelib_1_1_ptr_vector__slice.html#a49c021e144758caeec99eb69d24badfb">sz</a>, last));</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;  }</div>
<div class="line"><a name="l00316"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector__slice.html#aa63412d5d30d0397d5401cf9b9ae9172">  316</a></span>&#160;  <span class="keyword">const</span> T* <a class="code" href="structhelib_1_1_ptr_vector__slice.html#aa63412d5d30d0397d5401cf9b9ae9172">ptr2nonNull</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">orig</a>.ptr2nonNull(); }</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;};</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160; </div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00321"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___singleton.html">  321</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_vector___singleton.html">PtrVector_Singleton</a> : <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector</a>&lt;T&gt;</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;{</div>
<div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___singleton.html#a7830ec95aaded3dbd6e2c8238dd67ffb">  323</a></span>&#160;  <span class="keyword">const</span> T* <a class="code" href="structhelib_1_1_ptr_vector___singleton.html#a7830ec95aaded3dbd6e2c8238dd67ffb">v</a>;</div>
<div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___singleton.html#aa57fb094bafa13b99df1191727851d60">  324</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector___singleton.html#aa57fb094bafa13b99df1191727851d60">PtrVector_Singleton</a>(<span class="keyword">const</span> T* _v) : <a class="code" href="structhelib_1_1_ptr_vector___singleton.html#a7830ec95aaded3dbd6e2c8238dd67ffb">v</a>(_v) {}</div>
<div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___singleton.html#adac3d90173d796a5f05afd108936dc39">  325</a></span>&#160;  T* <a class="code" href="structhelib_1_1_ptr_vector___singleton.html#adac3d90173d796a5f05afd108936dc39">operator[]</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> (i == 0) ? ((T*)<a class="code" href="structhelib_1_1_ptr_vector___singleton.html#a7830ec95aaded3dbd6e2c8238dd67ffb">v</a>) : <span class="keyword">nullptr</span>; }</div>
<div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_vector___singleton.html#adf0c220d9b50ba19bef8add90655f813">  326</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_vector___singleton.html#adf0c220d9b50ba19bef8add90655f813">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> 1L; }</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;};</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160; </div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00330"></a><span class="lineno"><a class="line" href="namespacehelib.html#a810f01874466a0f57b41f96b8cb7a96c">  330</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">resize</a>(<a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; v, <span class="keywordtype">long</span> newSize, <span class="keyword">const</span> T&amp; val)</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;{</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector___singleton.html">PtrVector_Singleton&lt;T&gt;</a> t(&amp;val);</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;  v.<a class="code" href="structhelib_1_1_ptr_vector.html#a6a5775f538d76c96e6bc5067044d8f77">resize</a>(newSize, &amp;t);</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;}</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160; </div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160; </div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;<span class="preprocessor">#endif // ifndef HELIB_PTRVECTOR_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html_aa3b3860125fd143dbe11ee2ed91a5ce3"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html#aa3b3860125fd143dbe11ee2ed91a5ce3">helib::PtrVector_slice::start</a></div><div class="ttdeci">long start</div><div class="ttdef"><b>Definition:</b> PtrVector.h:279</div></div>
<div class="ttc" id="anamespacehelib_html_ae8f65ef133cee27ad846423d012d5487"><div class="ttname"><a href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">helib::lsize</a></div><div class="ttdeci">long lsize(const std::vector&lt; T &gt; &amp;v)</div><div class="ttdoc">Size of STL vector as a long (rather than unsigned long)</div><div class="ttdef"><b>Definition:</b> NumbTh.h:652</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html_a6f625d020b8d5af7991c91068838ae67"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html#a6f625d020b8d5af7991c91068838ae67">helib::PtrVector_slice::PtrVector_slice</a></div><div class="ttdeci">PtrVector_slice(const PtrVector_slice&lt; T &gt; &amp;slice, long from, long _sz=-1)</div><div class="ttdef"><b>Definition:</b> PtrVector.h:281</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_pt_html_a7915ecea39b38f475704f02b78e09053"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_pt.html#a7915ecea39b38f475704f02b78e09053">helib::PtrVector_VecPt::PtrVector_VecPt</a></div><div class="ttdeci">PtrVector_VecPt(NTL::Vec&lt; T * &gt; &amp;_v)</div><div class="ttdef"><b>Definition:</b> PtrVector.h:178</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___singleton_html_a7830ec95aaded3dbd6e2c8238dd67ffb"><div class="ttname"><a href="structhelib_1_1_ptr_vector___singleton.html#a7830ec95aaded3dbd6e2c8238dd67ffb">helib::PtrVector_Singleton::v</a></div><div class="ttdeci">const T * v</div><div class="ttdef"><b>Definition:</b> PtrVector.h:323</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___singleton_html_adf0c220d9b50ba19bef8add90655f813"><div class="ttname"><a href="structhelib_1_1_ptr_vector___singleton.html#adf0c220d9b50ba19bef8add90655f813">helib::PtrVector_Singleton::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:326</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_pt_html_a0dec1c13c3e3baeb4f23931bfbfc28e4"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_pt.html#a0dec1c13c3e3baeb4f23931bfbfc28e4">helib::PtrVector_vectorPt::operator[]</a></div><div class="ttdeci">T * operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:195</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_t_html_a46f021a0d256cb5e221763a21831a3db"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_t.html#a46f021a0d256cb5e221763a21831a3db">helib::PtrVector_vectorT::numNonNull</a></div><div class="ttdeci">long numNonNull(long first=0, long last=LONG_MAX) const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:264</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector_html_abc089c886cc629d470c5773eae531b81"><div class="ttname"><a href="structhelib_1_1_ptr_vector.html#abc089c886cc629d470c5773eae531b81">helib::PtrVector::operator[]</a></div><div class="ttdeci">virtual T * operator[](long) const =0</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_t_html_a593724493c64d574c3f7fa6a1ee97a12"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_t.html#a593724493c64d574c3f7fa6a1ee97a12">helib::PtrVector_vectorT::resize</a></div><div class="ttdeci">void resize(long newSize, const PtrVector&lt; T &gt; *another) override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:251</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_t_html_a1f8af4723666bb8463f9dc85b00b0eb2"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_t.html#a1f8af4723666bb8463f9dc85b00b0eb2">helib::PtrVector_VecT::PtrVector_VecT</a></div><div class="ttdeci">PtrVector_VecT(NTL::Vec&lt; T &gt; &amp;_v)</div><div class="ttdef"><b>Definition:</b> PtrVector.h:210</div></div>
<div class="ttc" id="aclasshelib_1_1_logic_error_html"><div class="ttname"><a href="classhelib_1_1_logic_error.html">helib::LogicError</a></div><div class="ttdoc">Inherits from Exception and std::logic_error.</div><div class="ttdef"><b>Definition:</b> exceptions.h:68</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_pt_html_a54662bb2902c8e8110e51a4ac9eb6f2b"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_pt.html#a54662bb2902c8e8110e51a4ac9eb6f2b">helib::PtrVector_vectorPt::PtrVector_vectorPt</a></div><div class="ttdeci">PtrVector_vectorPt(std::vector&lt; T * &gt; &amp;_v)</div><div class="ttdef"><b>Definition:</b> PtrVector.h:194</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_t_html_ad86a4d41f0525743ffca562e78d13564"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_t.html#ad86a4d41f0525743ffca562e78d13564">helib::PtrVector_VecT::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:212</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html_a8c453d6aa154e480686dfc82b80c0fe4"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html#a8c453d6aa154e480686dfc82b80c0fe4">helib::PtrVector_slice::numNonNull</a></div><div class="ttdeci">long numNonNull(long first=0, long last=LONG_MAX) const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:312</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_t_html_a39098ecd0d18e94eb5b0e03c32177834"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_t.html#a39098ecd0d18e94eb5b0e03c32177834">helib::PtrVector_vectorT::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:249</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___singleton_html_adac3d90173d796a5f05afd108936dc39"><div class="ttname"><a href="structhelib_1_1_ptr_vector___singleton.html#adac3d90173d796a5f05afd108936dc39">helib::PtrVector_Singleton::operator[]</a></div><div class="ttdeci">T * operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:325</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_t_html_a821ab9b9660ff5f23f00befbd9563821"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_t.html#a821ab9b9660ff5f23f00befbd9563821">helib::PtrVector_vectorT::v</a></div><div class="ttdeci">std::vector&lt; T &gt; &amp; v</div><div class="ttdef"><b>Definition:</b> PtrVector.h:246</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_pt_html_a82fdd9778f18cf7b87b12ea60dbf565b"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_pt.html#a82fdd9778f18cf7b87b12ea60dbf565b">helib::PtrVector_VecPt::operator[]</a></div><div class="ttdeci">T * operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:179</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_pt_html_af74fbb7079d79823dad48dab1c6872b2"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_pt.html#af74fbb7079d79823dad48dab1c6872b2">helib::PtrVector_vectorPt::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:196</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_t_html_a5bcfb83b4337e0e31367a1cae725affa"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_t.html#a5bcfb83b4337e0e31367a1cae725affa">helib::PtrVector_VecT::ptr2nonNull</a></div><div class="ttdeci">const T * ptr2nonNull() const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:236</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_t_html_a730d286bbba068be3c36ab69489a5d37"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_t.html#a730d286bbba068be3c36ab69489a5d37">helib::PtrVector_VecT::numNonNull</a></div><div class="ttdeci">long numNonNull(long first=0, long last=LONG_MAX) const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:228</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_t_html"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_t.html">helib::PtrVector_VecT</a></div><div class="ttdoc">An implementation of PtrVector using Vec&lt;T&gt;</div><div class="ttdef"><b>Definition:</b> PtrVector.h:208</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html_aa63412d5d30d0397d5401cf9b9ae9172"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html#aa63412d5d30d0397d5401cf9b9ae9172">helib::PtrVector_slice::ptr2nonNull</a></div><div class="ttdeci">const T * ptr2nonNull() const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:316</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector_html_ab731703604d61537a72ab8f2ca9c2735"><div class="ttname"><a href="structhelib_1_1_ptr_vector.html#ab731703604d61537a72ab8f2ca9c2735">helib::PtrVector::~PtrVector</a></div><div class="ttdeci">virtual ~PtrVector()</div><div class="ttdef"><b>Definition:</b> PtrVector.h:42</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_pt_html_a96a6d280cd775de74ab9b91a9e35d09c"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_pt.html#a96a6d280cd775de74ab9b91a9e35d09c">helib::PtrVector_VecPt::resize</a></div><div class="ttdeci">void resize(long newSize, UNUSED const PtrVector&lt; T &gt; *another=nullptr) override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:182</div></div>
<div class="ttc" id="anamespacehelib_html_aa7b1da8169ee8b9a0ab221e4c67961c5"><div class="ttname"><a href="namespacehelib.html#aa7b1da8169ee8b9a0ab221e4c67961c5">helib::assertNotNull</a></div><div class="ttdeci">void assertNotNull(const T &amp;p, const std::string &amp;message)</div><div class="ttdef"><b>Definition:</b> assertions.h:156</div></div>
<div class="ttc" id="anamespacehelib_html_ae2de6d470f49ed882f0bde7b67f5c456"><div class="ttname"><a href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">helib::setLengthZero</a></div><div class="ttdeci">void setLengthZero(std::vector&lt; T &gt; &amp;vec)</div><div class="ttdef"><b>Definition:</b> NumbTh.h:673</div></div>
<div class="ttc" id="aapi_attributes_8h_html_addf5ec070e9499d36b7f2009ce736076"><div class="ttname"><a href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a></div><div class="ttdeci">#define UNUSED</div><div class="ttdef"><b>Definition:</b> apiAttributes.h:31</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_pt_html"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_pt.html">helib::PtrVector_vectorPt</a></div><div class="ttdoc">An implementation of PtrVector using vector&lt;T*&gt;</div><div class="ttdef"><b>Definition:</b> PtrVector.h:192</div></div>
<div class="ttc" id="anamespacehelib_html_ad61eac49543dd3559b386f94ca7112c9"><div class="ttname"><a href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">helib::resize</a></div><div class="ttdeci">void resize(NTL::Vec&lt; T &gt; &amp;v, long sz, const T &amp;val)</div><div class="ttdef"><b>Definition:</b> NumbTh.h:695</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_t_html_a31444837cd854f5243c231da910849b5"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_t.html#a31444837cd854f5243c231da910849b5">helib::PtrVector_vectorT::PtrVector_vectorT</a></div><div class="ttdeci">PtrVector_vectorT(std::vector&lt; T &gt; &amp;_v)</div><div class="ttdef"><b>Definition:</b> PtrVector.h:247</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector_html_a1791944a5b25238b009597d88e83bc13"><div class="ttname"><a href="structhelib_1_1_ptr_vector.html#a1791944a5b25238b009597d88e83bc13">helib::PtrVector::size</a></div><div class="ttdeci">virtual long size() const =0</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_pt_html_ad1c539d9e2913a94f9f981810558c6c0"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_pt.html#ad1c539d9e2913a94f9f981810558c6c0">helib::PtrVector_vectorPt::resize</a></div><div class="ttdeci">void resize(long newSize, UNUSED const PtrVector&lt; T &gt; *another=nullptr) override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:198</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html_a9e13512a1a7039cbd3fdc910331c6f62"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html#a9e13512a1a7039cbd3fdc910331c6f62">helib::PtrVector_slice::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:310</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector_html_a5da2b16e1e2cd897c06440c99e01550b"><div class="ttname"><a href="structhelib_1_1_ptr_vector.html#a5da2b16e1e2cd897c06440c99e01550b">helib::PtrVector::numNonNull</a></div><div class="ttdeci">virtual long numNonNull(long first=0, long last=LONG_MAX) const</div><div class="ttdef"><b>Definition:</b> PtrVector.h:52</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector_html"><div class="ttname"><a href="structhelib_1_1_ptr_vector.html">helib::PtrVector</a></div><div class="ttdoc">Abstract class for an array of objects.</div><div class="ttdef"><b>Definition:</b> PtrVector.h:32</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector_html_a6a5775f538d76c96e6bc5067044d8f77"><div class="ttname"><a href="structhelib_1_1_ptr_vector.html#a6a5775f538d76c96e6bc5067044d8f77">helib::PtrVector::resize</a></div><div class="ttdeci">virtual void resize(long newSize, UNUSED const PtrVector *another=nullptr)</div><div class="ttdef"><b>Definition:</b> PtrVector.h:37</div></div>
<div class="ttc" id="aapi_attributes_8h_html"><div class="ttname"><a href="api_attributes_8h.html">apiAttributes.h</a></div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_t_html_a7ff9c92c58394a1aa942823fef8073b2"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_t.html#a7ff9c92c58394a1aa942823fef8073b2">helib::PtrVector_VecT::resize</a></div><div class="ttdeci">void resize(long newSize, const PtrVector&lt; T &gt; *another) override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:214</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_pt_html_a13beff6b37d2d307e5a1c26abb76d04f"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_pt.html#a13beff6b37d2d307e5a1c26abb76d04f">helib::PtrVector_VecPt::v</a></div><div class="ttdeci">NTL::Vec&lt; T * &gt; &amp; v</div><div class="ttdef"><b>Definition:</b> PtrVector.h:177</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector_html_afdc2a14a65d1d9e38cc95721ed245fd9"><div class="ttname"><a href="structhelib_1_1_ptr_vector.html#afdc2a14a65d1d9e38cc95721ed245fd9">helib::PtrVector::isSet</a></div><div class="ttdeci">bool isSet(long i) const</div><div class="ttdef"><b>Definition:</b> PtrVector.h:44</div></div>
<div class="ttc" id="anamespacehelib_html_a03ca08051d06a786cf812e238a0cad15"><div class="ttname"><a href="namespacehelib.html#a03ca08051d06a786cf812e238a0cad15">helib::vecCopy</a></div><div class="ttdeci">void vecCopy(V1 &amp;v1, const V2 &amp;v2, long sizeLimit=0)</div><div class="ttdef"><b>Definition:</b> PtrVector.h:111</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html">helib::PtrVector_slice</a></div><div class="ttdoc">An implementation of PtrVector as a slice of another PtrVector.</div><div class="ttdef"><b>Definition:</b> PtrVector.h:277</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_t_html_a3b565f0bbcb3681e6cdfc1c4eca25cbe"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_t.html#a3b565f0bbcb3681e6cdfc1c4eca25cbe">helib::PtrVector_VecT::operator[]</a></div><div class="ttdeci">T * operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:211</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_t_html"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_t.html">helib::PtrVector_vectorT</a></div><div class="ttdoc">An implementation of PtrVector using vector&lt;T&gt;</div><div class="ttdef"><b>Definition:</b> PtrVector.h:245</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_pt_html"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_pt.html">helib::PtrVector_VecPt</a></div><div class="ttdoc">An implementation of PtrVector using Vec&lt;T*&gt;</div><div class="ttdef"><b>Definition:</b> PtrVector.h:176</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_pt_html_a77990795ae1bcc2caf5747d3add8e6bb"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_pt.html#a77990795ae1bcc2caf5747d3add8e6bb">helib::PtrVector_vectorPt::v</a></div><div class="ttdeci">std::vector&lt; T * &gt; &amp; v</div><div class="ttdef"><b>Definition:</b> PtrVector.h:193</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___singleton_html_aa57fb094bafa13b99df1191727851d60"><div class="ttname"><a href="structhelib_1_1_ptr_vector___singleton.html#aa57fb094bafa13b99df1191727851d60">helib::PtrVector_Singleton::PtrVector_Singleton</a></div><div class="ttdeci">PtrVector_Singleton(const T *_v)</div><div class="ttdef"><b>Definition:</b> PtrVector.h:324</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___singleton_html"><div class="ttname"><a href="structhelib_1_1_ptr_vector___singleton.html">helib::PtrVector_Singleton</a></div><div class="ttdoc">An implementation of PtrVector from a single T object.</div><div class="ttdef"><b>Definition:</b> PtrVector.h:322</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html_a49c021e144758caeec99eb69d24badfb"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html#a49c021e144758caeec99eb69d24badfb">helib::PtrVector_slice::sz</a></div><div class="ttdeci">long sz</div><div class="ttdef"><b>Definition:</b> PtrVector.h:279</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html_a6e32e8c177881cca566e9a5a08a7b918"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html#a6e32e8c177881cca566e9a5a08a7b918">helib::PtrVector_slice::operator[]</a></div><div class="ttdeci">T * operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:309</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_t_html_ae2e91b219fd7dbe9c7b076e7327327e9"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_t.html#ae2e91b219fd7dbe9c7b076e7327327e9">helib::PtrVector_VecT::v</a></div><div class="ttdeci">NTL::Vec&lt; T &gt; &amp; v</div><div class="ttdef"><b>Definition:</b> PtrVector.h:209</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html_af631ab07ef484ac2e555a6406d8d2d16"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html#af631ab07ef484ac2e555a6406d8d2d16">helib::PtrVector_slice::PtrVector_slice</a></div><div class="ttdeci">PtrVector_slice(const PtrVector&lt; T &gt; &amp;_orig, long from, long _sz=-1)</div><div class="ttdef"><b>Definition:</b> PtrVector.h:299</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__vector_t_html_a77ddb054d9d3b96fd3975c4316f58794"><div class="ttname"><a href="structhelib_1_1_ptr_vector__vector_t.html#a77ddb054d9d3b96fd3975c4316f58794">helib::PtrVector_vectorT::operator[]</a></div><div class="ttdeci">T * operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:248</div></div>
<div class="ttc" id="aassertions_8h_html"><div class="ttname"><a href="assertions_8h.html">assertions.h</a></div><div class="ttdoc">Various assertion functions for use within HElib. These are meant as a replacement for C-style assert...</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector__slice_html_a8bb4510a87da9a375032fc02f07c5238"><div class="ttname"><a href="structhelib_1_1_ptr_vector__slice.html#a8bb4510a87da9a375032fc02f07c5238">helib::PtrVector_slice::orig</a></div><div class="ttdeci">const PtrVector&lt; T &gt; &amp; orig</div><div class="ttdef"><b>Definition:</b> PtrVector.h:278</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector_html_a3bf579aa08ab3625ba489571fe0148b8"><div class="ttname"><a href="structhelib_1_1_ptr_vector.html#a3bf579aa08ab3625ba489571fe0148b8">helib::PtrVector::ptr2nonNull</a></div><div class="ttdeci">virtual const T * ptr2nonNull() const</div><div class="ttdef"><b>Definition:</b> PtrVector.h:67</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector___vec_pt_html_a086388e84b3dbc5db2ae7bb22948071e"><div class="ttname"><a href="structhelib_1_1_ptr_vector___vec_pt.html#a086388e84b3dbc5db2ae7bb22948071e">helib::PtrVector_VecPt::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrVector.h:180</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
